package com.ysd.lis.controller.qi;


import com.ysd.common.Result;
import com.ysd.lis.controller.pub.BaseController;
import com.ysd.lis.entity.qi.QiTatVsItem;
import com.ysd.lis.request.qi.TatItemDto;
import com.ysd.lis.request.qi.TatItemParam;
import com.ysd.lis.service.qi.QiTatVsItemService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 * 任务与指标项目对照表 前端控制器
 * </p>
 *
 * @author prs
 * @since 2024-08-07
 */
@RestController
@RequestMapping("/api/qi/qiTatVsItem")
public class QiTatVsItemController extends BaseController {

    @Autowired
    private QiTatVsItemService qiTatVsItemService;

    @ApiOperation("获取报告项目")
    @GetMapping("/findLabItemDictListByTat")
    public Result findLabItemDictListByTat(TatItemParam param) {
        return qiTatVsItemService.findLabItemDictListByTat(param);
    }
    @ApiOperation("获取报告项目")
    @GetMapping("/findLabItemDictPageByTat")
    public Result findLabItemDictPageByTat(TatItemParam param) {
        return qiTatVsItemService.findLabItemDictPageByTat(param);
    }

    @ApiOperation("新增")
    @PostMapping("/addTatVsItem")
    public Result addTatVsItem(@RequestBody QiTatVsItem qiTatVsItem){
        return  qiTatVsItemService.addTatVsItem(qiTatVsItem);
    }
    @ApiOperation("查询")
    @GetMapping("/findQiTatVsItemList")
    public Result findQiTatVsItemList(TatItemParam param){
        return qiTatVsItemService.findQiTatVsItemList(param);
    }

    @ApiOperation("根据详情id删除详情数据")
    @PostMapping("/deleteTatVsItem")
    public Result deleteTatVsItem(@RequestBody QiTatVsItem qiTatVsItem) {
        return qiTatVsItemService.deleteTatVsItem(qiTatVsItem);
    }
    @ApiOperation("批量删除")
    @PostMapping("/batchDeleteTatItemList")
    public Result batchDeleteTatItemList(@RequestBody TatItemDto dto){
        return  qiTatVsItemService.batchDeleteTatItemList(dto);
    }

    @ApiOperation("修改")
    @PostMapping("/saveOrUpdateTatVsItem")
    public Result saveOrUpdateTatVsItem(@RequestBody TatItemDto dto) {
        return qiTatVsItemService.saveOrUpdateTatVsItem(dto);
    }
}
